import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/harry";

// 查询校区分页列表
export function listSchool(query) {
  return request({
    url: '/sys/school/pageList',
    method: 'get',
    params: query
  })
}
// 查询所有校区 0启用1关闭
export function listSchoolAll(query) {
  return request({
    url: '/sys/school/list',
    method: 'get',
    params: query
  })
}
// 新增校区 无id新增有id编辑
export function addSchool(data) {
  return request({
    url: '/sys/school/create',
    method: 'post',
    data: data
  })
}
// 删除校区
export function delSchool(id) {
  return request({
    url: '/sys/school/delete/' + id,
    method: 'delete'
  })
}

export function getDeptList(id) {
  return request({
    url: '/sys/school/create/select',
    method: 'get'
  })
}
export function getHead(id) {
  return request({
    url: '/sys/school/select',
    method: 'get'
  })
}
